<%@page import="java.text.SimpleDateFormat"%>
<%@page import="com.crossriver.crgis.database.service.Held_PlotsLocalServiceUtil"%>
<%@page import="com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil"%>
<%@page import="com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil"%>
<%@page import="com.liferay.portal.kernel.dao.orm.DynamicQuery"%>
<%@page import="com.crossriver.crgis.database.model.Held_Plots"%>
<%@page import="com.liferay.portal.service.LayoutLocalServiceUtil"%>
<%@page import="com.liferay.portal.theme.ThemeDisplay"%>

<%@ page import="com.crossriver.crgis.cofo.util.ApplicationCofOConstants" %>
 
<%@ page import="com.crossriver.crgis.database.model.Application_C_of_O" %>
<%@page import="com.crossriver.crgis.database.model.Organisation_Information"%>
<%@page import="com.crossriver.crgis.database.model.Company_Contact_Person"%>
<%@page import="com.crossriver.crgis.database.model.History_Of_Information"%>
<%@page import="com.crossriver.crgis.database.model.Contact_Information"%>
<%@page import="com.crossriver.crgis.database.model.Property_Information"%>
<%@page import="com.crossriver.crgis.database.model.Supporting_Document"%>


<%@taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%>
<%@ include file="/init.jsp"%>


<%

Application_C_of_O appl =
		(Application_C_of_O)request.getAttribute(
				ApplicationCofOConstants.APPL_C_OF_O_SESSION_ATTR);


Organisation_Information orgInfo = (Organisation_Information)
			request.getAttribute(
				ApplicationCofOConstants.ORGANISATION_INFO_SESSION_ATTR);

Company_Contact_Person coyContPerson = (Company_Contact_Person)
request.getAttribute(
	ApplicationCofOConstants.COY_CONTACT_SESSION_ATTR);


List<History_Of_Information> history = (List<History_Of_Information>)
					request.getAttribute(
						ApplicationCofOConstants.HISTORY_INFO_SESSION_ATTR);


Contact_Information indContInfo = (Contact_Information)
		request.getAttribute(
			ApplicationCofOConstants.IND_CONTACT_SESSION_ATTR);

Property_Information propInfo = (Property_Information)
			request.getAttribute(
				ApplicationCofOConstants.PROPERTY_INFO_SESSION_ATTR);


List<Supporting_Document> suppDocs = (List<Supporting_Document>)
			request.getAttribute(
				ApplicationCofOConstants.SUPP_DOC_INFO_SESSION_ATTR);
int heldPlotsCounter =0;
List<Held_Plots> heldPlots = null;

//heldPlots = ApplicationActionUtil.getHeldPlots(actionRequest);
DynamicQuery query = DynamicQueryFactoryUtil.forClass(Held_Plots.class)
.add(PropertyFactoryUtil.forName("applicationId").eq(new String(propInfo.getApplicationId())));

try {
	 heldPlots=	Held_PlotsLocalServiceUtil.dynamicQuery(query);
	 heldPlotsCounter = heldPlots.size();
} catch (SystemException e) {
	// TODO Auto-generated catch block
	e.printStackTrace();
}
%>


<liferay-portlet:actionURL name="proccedToPayment" var="proccedToPayment"></liferay-portlet:actionURL>

<aui:form action="<%=proccedToPayment.toString() %>" method="post" name="pickApplicationType_fm">
<% String app = appl.getApplication(); %>
 <div id="main">
	<%
	if("certification".equalsIgnoreCase(app)){
	%>
	<h1>Application for Certificate Of Occupancy</h1>
	<%
	}else if("re-certification".equalsIgnoreCase(app)){
	%>
	<h1>Application for Re-Certificate Of Occupancy</h1>
	<%
	}else {
	%>
	<h1>Application for State Land</h1>
	<%
	}
	%>
	
	<div class="content">
<!-- 		<table width="100%" border="0" cellpadding="0" cellspacing="0"> -->
<!-- 			<tr> -->
<!-- 			<td width="15%" valign="top"> -->
				
<!-- 			</td> -->
				
<!-- 			<td width="85%" valign="top"> -->
				<aui:input name="applicationId" type="hidden" value="<%= appl.getApplicationId() %>"></aui:input>
				<aui:input name="buttonClicked" type="hidden" value=""></aui:input>
				<table width="100%" id="mainform">
					<tr>
						<td class="title" colspan="3">
						
							<%
						 		long plidMgtProfile = LayoutLocalServiceUtil.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), true, "/friendlyappcofo").getPlid();
						 	%>
							
							<liferay-portlet:actionURL portletName="printcofo_WAR_CRGISTransactionCofOportlet" plid="<%= plidMgtProfile %>" var="printerFriendly" >
						 		<liferay-portlet:param name="javax.portlet.action" value="printerFriendly"></liferay-portlet:param>
							  <liferay-portlet:param name="applicationId" value="<%= appl.getApplicationId() %>"></liferay-portlet:param>
					 		</liferay-portlet:actionURL>
						
							<script type="text/javascript">
							// Popup window code
							function printerFriendlyPopup(url) {
								popupWindow = window.open(
									url,'popUpWindow','height=700,width=800,left=10,top=10,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')
							}
							</script>
							<a href="JavaScript:printerFriendlyPopup('<%= printerFriendly %>');"><img alt="" src="${renderRequest.contextPath}/images/print.gif" ></a>
							<br>
							Application Complete
						
						</td>
						
						
						
						
						
					</tr>
					<tr>
						<td align="right" colspan="3">
						<hr> 
						
						
												
						<%
					 	long plidpayments = LayoutLocalServiceUtil.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), true, "/payments").getPlid();
					 	%>
					 						 	
					 	<%
					 	long plidapplications = LayoutLocalServiceUtil.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), true, "/applications").getPlid();
					 	%>
					 	
					 	<%
					 	String paymentType = appl.getApplicationType() + "-" + appl.getApplication();
					 	
					 	%>
					 	
					 	<liferay-portlet:renderURL portletName="" plid="<%= plidpayments %>" var="urlPaymentsOld" >
					 	</liferay-portlet:renderURL>
					 	
				 		<liferay-portlet:actionURL portletName="Payments_WAR_CRGISTransactionCofOportlet" plid="<%= plidpayments %>" var="urlPayments" >
					 		<liferay-portlet:param name="javax.portlet.action" value="showApplications"></liferay-portlet:param>
						  <liferay-portlet:param name="applicationId" value="<%= appl.getApplicationId() %>"></liferay-portlet:param>
						  <liferay-portlet:param name="paymentType" value="<%= paymentType %>"></liferay-portlet:param>
				 		</liferay-portlet:actionURL>
					 	
					 	
					 	<liferay-portlet:renderURL portletName="" plid="<%= plidapplications %>" var="urlApplications" >
					 	</liferay-portlet:renderURL>
												
						 <span style="float: right; margin: 0; padding: 0">
						 
						 	<a href="<%= urlApplications %>">See List Of Your Applications</a> 
						 	
						<%if("SUBMITTED".equalsIgnoreCase(appl.getStatus())) {%>
						|
						<a href="<%= urlPayments %>">Proceed To Payment</a>
						<%} %>
						

						</span><br>

						
						</td>
					</tr>
					
					
					<tr>
						<td colspan="3"><br>
							<span style="float: left; margin: 0; padding: 0" class="stitle">File Information</span> 
							<span style="float: right; margin: 0; padding: 0"></span><br>
							<hr>
						</td>
					</tr>
					
					<tr>
						<td colspan="3"><br>
							<span class="dtitle">Reference Number</span> 
							<span class="data"><%= appl.getReferenceNo()%></span>
						</td>
					</tr>
					<tr>
						<td colspan="3"><br>
							<span class="dtitle">Application Identification Number</span> 
							<span class="data"><%= appl.getApplicationId()%></span>
						</td>
					</tr>

				<!-- Show this if this Re-CofO -->
				<%
				if (appl.getApplication().equalsIgnoreCase("RE-CERTIFICATION"))
				{
				%>
					<tr>
						<td colspan="3"><br>
							<liferay-portlet:actionURL var="editOldFileInfomation">
							  <liferay-portlet:param name="javax.portlet.action" value="editOldFileInfomation"></liferay-portlet:param>
							  <liferay-portlet:param name="applicationId" value="<%= appl.getApplicationId() %>">"></liferay-portlet:param>
							</liferay-portlet:actionURL>
							<span style="float: left; margin: 0; padding: 0" class="stitle">Old File Information</span> 
							<span style="float: right; margin: 0; padding: 0"> </span><br>
							<hr>
						</td>
					</tr>
					
					<tr>
						<td colspan="3">
							<span class="dtitle">Old Certificate of Occupancy Number</span> 
							<span class="data"><%= appl.getOldCofONo()%></span>
						</td>
					</tr>
					<tr>
						<td colspan="3"><br>
							<span class="dtitle">File Number</span> 
							<span class="data"><%= appl.getFileNo()%></span>
						</td>
					</tr>
				
				<%
				}
				%>
					
					 
					<tr>
						<td colspan="3"><br>
							<liferay-portlet:actionURL var="editOrganisationInformation">
							  <liferay-portlet:param name="javax.portlet.action" value="editOrganisationInformation"></liferay-portlet:param>
							  <liferay-portlet:param name="applicationId" value="<%= appl.getApplicationId() %>">"></liferay-portlet:param>
							</liferay-portlet:actionURL>
							<span style="float: left; margin: 0; padding: 0" class="stitle">Organisation Information</span> 
							<span style="float: right; margin: 0; padding: 0"> </span><br>
							<hr>
						</td>
					</tr>
					
					 
					<tr>
						<td colspan="2">
							<span class="dtitle">Organisation Full Name</span> 
							<span class="data"> <%= orgInfo.getOrganisationName().toUpperCase() %></span>
						</td>
						<td><br>
							<span class="dtitle">Registration Number (RC)</span> 
							<span class="data"><%= orgInfo.getRegNo().toUpperCase() %></span>
						</td>
					</tr>
					<tr>
						<td><br>
							<span class="dtitle">Country of Registration</span>
							<span class="data"><%= orgInfo.getCountryOfReg().toUpperCase() %></span>
						</td>
						<td colspan="2"><br>
							<span class="dtitle">Date of Registration</span> 
							
							<%
							SimpleDateFormat sdf = new SimpleDateFormat("dd MMM yyyy");
							String formattedDOR = "";
							if (orgInfo != null  && null != orgInfo.getDateOfRegistration()){
								formattedDOR = sdf.format(orgInfo.getDateOfRegistration());
							}
						%>
							<span class="data"><%= formattedDOR %></span>
						</td>
					</tr>
					<tr>
						<td colspan="3"><br>
							<span class="dtitle">Nature of Business</span> 
							<span class="data"><%= orgInfo.getNatureOfBusiness().toUpperCase() %></span></td>
					</tr>
					<tr>
						<td colspan="3"><br>
							<span class="stitle">Organisation Contact Person</span> 
<%-- 							<span style="float: right; margin: 0; padding: 0"> </span><br> --%>
							<hr>
						</td>
					</tr>
					<tr>
						<td colspan="2"><br><span class="dtitle">Designation: </span><span class="data"><%= coyContPerson.getDesignation() %></span></td>	
            <td><br><span class="dtitle">Title: </span><span class="data"><%= coyContPerson.getTitle() %></span></td>
	        </tr>
	        <tr>
						<td width="33%"><br><span class="dtitle">Last Name: </span><span class="data"><%= coyContPerson.getLastName().toUpperCase() %></span></td>	
            <td width="33%"><br><span class="dtitle">First Name: </span><span class="data"><%= coyContPerson.getFirstName().toUpperCase() %></span></td>
            <td width="33%"><br><span class="dtitle">Middle Name:</span><span class="data"><%= coyContPerson.getMiddleName().toUpperCase() %></span></td>
	        </tr>
	        <tr>
						<td><br><span class="dtitle">Mobile Phone: </span><span class="data"><%= coyContPerson.getPhoneMobile() %></span></td>	
            <td><br><span class="dtitle">Office Phone: </span><span class="data"><%= coyContPerson.getPhoneHome() %></span></td>
            <td><br><span class="dtitle">Home Phone:</span><span class="data"><%= coyContPerson.getPhoneOffice() %></span></td>
	        </tr>
	        <tr>
						<td colspan="2"><br><span class="dtitle">Email Address:</span><span class="data"><%= coyContPerson.getEmailAddress() %></span></td>	
            <td><br><span class="dtitle">Fax: </span><span class="data"><%= coyContPerson.getFax() %></span></td>
	        </tr>
		      <tr>
						<td><br><span class="dtitle">Identification Document:</span><span class="data"><%= coyContPerson.getIdentificationDoc() %></span></td>	
            <td colspan="2"><br><span class="dtitle" >Identification Document Number: </span><span class="data"><%= coyContPerson.getIdentificationDocNo() %></span></td>
	        </tr>     	
	
							<liferay-portlet:actionURL var="editAddressInformation">
							  <liferay-portlet:param name="javax.portlet.action" value="editAddressInformation"></liferay-portlet:param>
							  <liferay-portlet:param name="applicationId" value="<%= appl.getApplicationId() %>">"></liferay-portlet:param>
							</liferay-portlet:actionURL>
							
					<tr>
						<td colspan="3"><br>
							<span style="float: left; margin: 0; padding: 0" class="stitle">Address Information</span> 
							<span style="float: right; margin: 0; padding: 0"> </span><br>
							<hr>
						</td>
					</tr>
					
					<tr>
						<td colspan="3"><br>
							<span class="dtitle">Contact Address</span> 
							<span class="data"> 
								<%= indContInfo.getHouseNo() %>,
								<%= indContInfo.getAddressLine1() %><br>
								<%= indContInfo.getAddressLine2() %>, 
							</span>
						</td>
					</tr>
					<tr>
						<td><br><span class="dtitle">City/Town</span> <span class="data"><%= indContInfo.getCity()%></span></td>
						<td><br><span class="dtitle">State</span> <span class="data"><%= indContInfo.getState() %></span></td>
						<td><br><span class="dtitle">Country</span> <span class="data"><%= indContInfo.getCountry() %></span></td>
					</tr>
					<tr>
						<td colspan="3"><br><span class="dtitle">P.M.B Address</span> <span class="data"><%= indContInfo.getPoBox() %></span></td>
					</tr>
					
						<liferay-portlet:actionURL var="editContactInformation">
						  <liferay-portlet:param name="javax.portlet.action" value="editContactInformation"></liferay-portlet:param>
						  <liferay-portlet:param name="applicationId" value="<%= appl.getApplicationId() %>">"></liferay-portlet:param>
						</liferay-portlet:actionURL>
						
					<tr>
						<td colspan="3"><br>
							<span class="stitle">Contact Information</span> 
							<span style="float:right; margin: 0; padding: 0"> </span>
							<hr>
						</td>
					</tr>
					<tr>
						<td><br><span class="dtitle">Mobile Phone</span><span class="data"><%= indContInfo.getPhoneMobile() %></span></td>
						<td><br><span class="dtitle">Office Phone</span><span class="data"><%= indContInfo.getPhoneOffice() %></span></td>
						<td><br><span class="dtitle">Home Phone</span><span class="data"><%= indContInfo.getPhoneHome() %></span></td>
					</tr>
					<tr>
						<td colspan="3"><br><span class="dtitle">Email Address</span> <span class="data"><%= indContInfo.getEmailAddress() %></span></td>
					</tr>
					
					<liferay-portlet:actionURL var="editApplicationHistory">
					  <liferay-portlet:param name="javax.portlet.action" value="editApplicationHistory"></liferay-portlet:param>
					  <liferay-portlet:param name="applicationId" value="<%= appl.getApplicationId() %>"></liferay-portlet:param>
					</liferay-portlet:actionURL>
					
					<tr>
						<td colspan="3"><br>
							<span style="float: left; margin: 0; padding: 0" class="stitle">Application History</span> 
							<span style="float: right; margin: 0; padding: 0"> </span><br>
							<hr>
						</td>
					</tr>
					
					<tr>
						<td colspan="3">
							<table id="tb" cellpadding="5">
								<tr class="tbtitle"><td>Application Number of Previous Application</td></tr>
								<%
								for (int i =0; i<history.size(); i++){
									History_Of_Information hist  = history.get(i);
								%>
								<tr>
									<td>
									<%= hist.getOldApplicationId()%>
									</td>
								</tr>
								
								<%
								}
								%>
							</table>
						</td>
					</tr>
					
						<liferay-portlet:actionURL var="editPropertyInformation">
						  <liferay-portlet:param name="javax.portlet.action" value="editPropertyInformation"></liferay-portlet:param>
						  <liferay-portlet:param name="applicationId" value="<%= appl.getApplicationId() %>">"></liferay-portlet:param>
						</liferay-portlet:actionURL>
					
					
					<tr>
						<td colspan="3"><br>
							<span class="stitle">Property Information</span> 
							<span style="float: right; margin: 0; padding: 0"> </span><br>
						<hr>
						</td>
					</tr>
					<%
					if("stateland".equalsIgnoreCase(appl.getApplication())){
					%>
					<tr>
					<td ><br>
							<span class="dtitle">Plot Location:</span> </td>
						<td><span class="data"><%= propInfo.getLocationType() %></span>
						</td>
							
					</tr>
					<%
					if ("town".equalsIgnoreCase(propInfo.getLocationType())){
						
					%>
					<tr>
						<td ><br>
							<span class="dtitle">LGA</span> 
							<span class="data"> <%= propInfo.getLga() %></span>
						</td>
						<td><br>
							<span class="dtitle">Town</span> 
							<span class="data"><%= propInfo.getTown()%> </span>
						</td>
						<td><br>
							<span class="dtitle">Village</span> 
							<span class="data"> <%= propInfo.getVillage()%> </span>
						</td>
						<td>&nbsp;
							
						</td>
					</tr>
					<%
					}else
					{
					%>
					<tr>
						<td colspan="4"><br>
							<span class="dtitle">Plot Layout</span>
							<span class="data"><%= propInfo.getLandLocation() %></span>
						</td>
					</tr>
					<%
					}
					%>
					
					
					<tr>
						<td colspan="3"><br>
							<span class="dtitle"> Give full description of plot for ease of identification supported with a sketch plan showing dimensions:<br> </span>
							<span class="data"><%= propInfo.getOtherUsefulInformation()%></span>  
						</td>
					</tr>
					
					
					<tr>
						<td ><br>
							<span class="dtitle">Length of term applied for</span> 
							<span class="data"> <%= propInfo.getTerm() %></span>
						</td>
						<td><br>
							<span class="dtitle">Estimated Cost of Development</span> 
							<span class="data">&#8358;<%= propInfo.getEstDevCost()%> </span>
						</td>
						<td><br>
							<span class="dtitle">Time to start building</span> 
							
							<%
							
							String formattedEstStartDate = "";
							if (propInfo != null  && null != propInfo.getEstStartDate()){
								formattedEstStartDate = sdf.format(propInfo.getEstStartDate());
							}
						%>
							<span class="data"> <%= formattedEstStartDate %> </span>
						</td>
					</tr>
					<tr>
					<td colspan="3">
					<br>
					<b>Particulars of Plots held by applicant:</b>
					<table border="thin solid #CCCCCC" cellpadding="0" cellspacing="0" id="tblparticulars">
			<tr>
				
				<td>Location</td>
				<td>Area(sq.m.)</td>
				<td>Is Plot Developed?</td>
				<td>Mode of Acquisition</td>
				<td>Registration Particulars</td>
								
			</tr>
			
			 
			<%
			
			for (int i = 0; i <heldPlotsCounter; i++) {
				Held_Plots held_plotItem = heldPlots.get(i);
				
			%>
			<tr id="<%= i %>">
						<td><%= held_plotItem.getLocation() %> </td>
						
						 <td><%= held_plotItem.getArea() %></td>
						
						 <td><%= held_plotItem.getDeveloped()%></td>
						 <td><%=held_plotItem.getAcquisitionMode() %></td>
						 <td><%= held_plotItem.getRegParticulars() %></td>
			</tr>
			
			<%
			}
			%>
			<tr>
						<td colspan="4"><br>
						<table id="tb" cellpadding="5">
							<tr class="tbtitle">
								<td>Land Use:</td>
								<td>Land Purpose:</td>
							</tr>
							<tr>
								<td><%= appl.getLandUseType() %></td>
								<td><%= appl.getLandUsePurpose()%></td>
							</tr>
						</table>
						</td>
					</tr>	
		</table>
		</td>
		</tr>
					<%	
					}else{
					%>	
					
			
					<tr>
						<td colspan="4">
							<table id="tb" cellpadding="5">
								<tr class="tbtitle">
									<td>Land Use:</td>
									<td>Land Purpose:</td>
								</tr>
								<tr>
									<td><%= appl.getLandUseType() %></td>
									<td><%= appl.getLandUsePurpose()%></td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td><br><span class="dtitle">Property Type</span> <span class="data"> <%= propInfo.getPropertyType()%></span></td>
						<td><br><span class="dtitle">Land Area</span> <span class="data"><%= propInfo.getArea()%> <%= propInfo.getUom()%> </span></td>
						<td><br><span class="dtitle">Block No.</span> <span class="data"> <%= propInfo.getBlockNo()%> </span></td>
					</tr>
					<tr>
						<td><br><span class="dtitle">Land Location</span> <span class="data"><%= propInfo.getLandLocation()%></span></td>
						<td colspan="2"><br>
							<span class="dtitle">City/Town/Village</span> 
							<span class="data"><%= propInfo.getCity()%>, <%= propInfo.getState()%>, <%= propInfo.getCountry()%></span>
						</td>
					</tr>
					<tr>
						<td colspan="3"><br>
							<span class="dtitle"> 
								Please provide additional useful information that may assist the agency in processing your application.
							</span>
							<span class="data"><%= propInfo.getOtherUsefulInformation()%></span> 
						</td>
					</tr>
					<tr>
						<%
						if("re-certification".equalsIgnoreCase(app)){
					%>
						<td colspan="4"><br>
							<span class="dtitle">What is the date on the Original Certifiate of Occupancy (CofO)?</span>
							
							<%
							
							String formattedOrigCofODate = "";
							if (propInfo != null  && null != propInfo.getOrigCofODate()){
								formattedOrigCofODate = sdf.format(propInfo.getOrigCofODate());
							}
						%>
						
							<span class="data"><%= formattedOrigCofODate %></span>
						</td>
					<%
					}
					%>
					</tr>
					<tr>
						<td colspan="3"><br>
							<span class="dtitle">Was the original allocation made to you?</span>
							<span class="data"><%= propInfo.getAllocationMadToYou()%></span>
							</td>
					</tr> 
					<tr>
						<td colspan="3"><br>
							<span class="dtitle">Do you have an assignment?</span>
							<span class="data"><%= propInfo.getAssignedToYou()%></span> 
						</td>
					</tr>
					<tr>
						<td colspan="3"><br>
							<span class="dtitle">Specify Required Land Use</span> 
							<span class="data"><%= appl.getLandUseType()%></span>
						</td>
					</tr>
					<tr>
						<td colspan="3"><br>
							<span class="dtitle">Specify Purpose</span> 
							<span class="data"> <%= appl.getLandUsePurpose()%></span></td>
					</tr>
					<%
					}
					%>
							<liferay-portlet:actionURL var="editSupportingDoc">
							  <liferay-portlet:param name="javax.portlet.action" value="editSupportingDoc"></liferay-portlet:param>
							  <liferay-portlet:param name="applicationId" value="<%= appl.getApplicationId() %>"></liferay-portlet:param>
							</liferay-portlet:actionURL>
					
					<tr>
						<td colspan="3"><br>
							<span class="stitle">Uploads</span> 
							<span style="float: right; margin: 0; padding: 0"> </span><br>
						<hr>
						</td>
					</tr>
					<tr>
						<td colspan="3"><span>Documents Uploaded</span></td>
					</tr>
					
					<tr>
						<td colspan="3">
							<table id="tb" cellpadding="5">
								<tr class="tbtitle">
									<td>Document Name</td>
									<td>File Name</td>
									<td>Document Type</td>
								</tr>
								<%
								for (int i = 0; i<suppDocs.size(); i++){
									Supporting_Document suppDoc = suppDocs.get(i);
								%>
								<tr>
									<td >
										<%= suppDoc.getDocumentName() %>
									</td>
									<td >
									 <%= suppDoc.getFileName() %>
										
									</td>
									<td >
									<%= suppDoc.getDocumentType() %>
									</td>
									
								</tr>
								
								<%
								}
								%>
							</table>
						</td>
					</tr>
					<tr>
						<td colspan="3" align="right"><br>
						<hr>
						 <span style="float: right; margin: 0; padding: 0">
						 
						 	<a href="<%= urlApplications %>" style="color: red; font-weight: bold;">See List Of Your Applications</a>

						<%if("SUBMITTED".equalsIgnoreCase(appl.getStatus())) {%>
						|
						<a href="<%= urlPayments %>" style="color: red; font-weight: bold;">Proceed To Payment</a>
						<%} %>
						
						 	
						</span>
						</td>
					</tr>
					
				</table>
<!-- 				</td> -->
<!-- 			</tr> -->
<!-- 		</table> -->
	</div>
</div>
</aui:form>

 
 